import request from '@/http/index'
const baseUrl = '/portal/r/jd'


//新旧门户切换
export function getPortalold(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.changeportaltype`
	});
}

//门户切换
export function getPortalCut(sid,cut) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.switching&nowPage=${cut}`
	});
}

//个人信息
export function getPersonal(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.getuserinfo`
	});
}

//消息数量
export function getMessageNumber(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.getunreadnum`
	});
}

//退出门户
export function getQuitPortal(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.logout`
	});
}

//设定默认门户
export function getDefaultPortal(sid,cut) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.logout&nowPage=${cut}`
	});
}

//获取门户背景
export function getPortalBg(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.group.getbackground`
	});
}

//获取公告
export function getNoticeList(sid,params) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.notice&type=${''}&query=${JSON.stringify(params)}`
	});
}

//获取要闻
export function getNewsList(sid,params) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.importannews&type=${''}&query=${JSON.stringify(params)}`
	});
}

//获取甬矽周
export function geYXWeek(sid,week) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&startDate=${week}&cmd=portal.grounp.getweeks`
	});
}

//获取日历假日
export function getVacation(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.getjtdays`
	});
}

//获取节假日
export function getHolidays(sid,dayOne) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&startDate=${dayOne}&cmd=portal.grounp.getDateName`
	});
}

//获取日历会议日程
export function getDays(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.getdays`
	});
}

//获取当前日程安排
export function getCurrentSchedule(sid,date) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.getdaysinfo&date=${date}`
	});
}

//添加当前日程安排
export function addCurrentSchedule(sid,sdate,edate,title,remark) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.addinfo&sDate=${sdate}&eDate=${edate}&title=${title}&remark=${remark}`
	});
}
//修改当前日程安排
export function modifyCurrentSchedule(sid,sdate,edate,title,remark,id) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.xginfo&sDate=${sdate}&eDate=${edate}&title=${title}&remark=${remark}&id=${id}`
	});
}

//删除当前日程安排
export function delCurrentSchedule(sid,id) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.person.removeinfo&id=${id}`
	});
}
//获取风采
export function getDemeanorList(sid,params) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.staffmien&type={''}&query=${JSON.stringify(params)}`
	});
}

//获取电子书
export function getEbookList(sid) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.ebook`
	});
}

//获取党群
export function getPmList(sid,params) {
	return request({
		method: 'get',
		url: `${baseUrl}?sid=${sid}&cmd=portal.grounp.political&type={''}&query=${JSON.stringify(params)}`
	});
}

export function getList1(params) {
	return request({

		url: '/portal/api/databoard/databoard/getThreeOneOneData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}

export function center(params) {
	return request({

		url: '/portal/api/databoard/databoard/getProjectData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}

export function getRuleOfLawData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getRuleOfLawData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getProjectDataByType(params) {
	return request({

		url: '/portal/api/databoard/databoard/getProjectDataByType',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}

export function getInvestmentTypeData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getInvestmentTypeData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getInvestmentTrendData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getInvestmentTrendData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getHoldingCompanyData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getHoldingCompanyData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getStockCompanyData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getStockCompanyData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getPropertyData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getPropertyData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}


export function getPropertyUseData(params) {
	return request({

		url: '/portal/api/databoard/databoard/getPropertyUseData',

		method: 'get',
		headers: {
			"content-type": "application/json",
			"Authorization": "Basic empnajp6amdq"
		},
		params
	})
}



